import React from 'react'
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
import Layout from '../views/Layout'
import Home from '../views/Home'
import Category from '../views/Category'
import Cart from '../views/Cart'
import My from '../views/My'

export default function Index() {
    return (
        <BrowserRouter>
            <Routes>
                <Route path="/" element={<Layout />}>
                    <Route index element={<Navigate to="/home" />}></Route>
                    <Route path="/home" element={<Home />}></Route>
                    <Route path="/category" element={<Category />}></Route>
                    <Route path="/cart" element={<Cart />}></Route>
                    <Route path="/my" element={<My />}></Route>
                </Route>
            </Routes>
        </BrowserRouter>
    )
}
